/** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ Drupal.debounce = function (func, wait, immediate) { var timeout; var result; return function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } var context = this; var later = function later() { timeout = null; if (!immediate) { result = func.apply(context, args); } }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) { result = func.apply(context, args); } return result; }; };; /** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ (function ($, Drupal, debounce) { $.fn.drupalGetSummary = function () { var callback = this.data('summaryCallback'); return this[0] && callback ? $.trim(callback(this[0])) : ''; }; $.fn.drupalSetSummary = function (callback) { var self = this; if (typeof callback !== 'function') { var val = callback; callback = function callback() { return val; }; } return this.data('summaryCallback', callback).off('formUpdated.summary').on('formUpdated.summary', function () { self.trigger('summaryUpdated'); }).trigger('summaryUpdated'); }; Drupal.behaviors.formSingleSubmit = { attach: function attach() { function onFormSubmit(e) { var $form = $(e.currentTarget); var formValues = $form.serialize(); var previousValues = $form.attr('data-drupal-form-submit-last'); if (previousValues === formValues) { e.preventDefault(); } else { $form.attr('data-drupal-form-submit-last', formValues); } } $('body').once('form-single-submit').on('submit.singleSubmit', 'form:not([method~="GET"])', onFormSubmit); } }; function triggerFormUpdated(element) { $(element).trigger('formUpdated'); } function fieldsList(form) { var $fieldList = $(form).find('[name]').map(function (index, element) { return element.getAttribute('id'); }); return $.makeArray($fieldList); } Drupal.behaviors.formUpdated = { attach: function attach(context) { var $context = $(context); var contextIsForm = $context.is('form'); var $forms = (contextIsForm ? $context : $context.find('form')).once('form-updated'); var formFields; if ($forms.length) { $.makeArray($forms).forEach(function (form) { var events = 'change.formUpdated input.formUpdated '; var eventHandler = debounce(function (event) { triggerFormUpdated(event.target); }, 300); formFields = fieldsList(form).join(','); form.setAttribute('data-drupal-form-fields', formFields); $(form).on(events, eventHandler); }); } if (contextIsForm) { formFields = fieldsList(context).join(','); var currentFields = $(context).attr('data-drupal-form-fields'); if (formFields !== currentFields) { triggerFormUpdated(context); } } }, detach: function detach(context, settings, trigger) { var $context = $(context); var contextIsForm = $context.is('form'); if (trigger === 'unload') { var $forms = (contextIsForm ? $context : $context.find('form')).removeOnce('form-updated'); if ($forms.length) { $.makeArray($forms).forEach(function (form) { form.removeAttribute('data-drupal-form-fields'); $(form).off('.formUpdated'); }); } } } }; Drupal.behaviors.fillUserInfoFromBrowser = { attach: function attach(context, settings) { var userInfo = ['name', 'mail', 'homepage']; var $forms = $('[data-user-info-from-browser]').once('user-info-from-browser'); if ($forms.length) { userInfo.forEach(function (info) { var $element = $forms.find("[name=".concat(info, "]")); var browserData = localStorage.getItem("Drupal.visitor.".concat(info)); var emptyOrDefault = $element.val() === '' || $element.attr('data-drupal-default-value') === $element.val(); if ($element.length && emptyOrDefault && browserData) { $element.val(browserData); } }); } $forms.on('submit', function () { userInfo.forEach(function (info) { var $element = $forms.find("[name=".concat(info, "]")); if ($element.length) { localStorage.setItem("Drupal.visitor.".concat(info), $element.val()); } }); }); } }; var handleFragmentLinkClickOrHashChange = function handleFragmentLinkClickOrHashChange(e) { var url; if (e.type === 'click') { url = e.currentTarget.location ? e.currentTarget.location : e.currentTarget; } else { url = window.location; } var hash = url.hash.substr(1); if (hash) { var $target = $("#".concat(hash)); $('body').trigger('formFragmentLinkClickOrHashChange', [$target]); setTimeout(function () { return $target.trigger('focus'); }, 300); } }; var debouncedHandleFragmentLinkClickOrHashChange = debounce(handleFragmentLinkClickOrHashChange, 300, true); $(window).on('hashchange.form-fragment', debouncedHandleFragmentLinkClickOrHashChange); $(document).on('click.form-fragment', 'a[href*="#"]', debouncedHandleFragmentLinkClickOrHashChange); })(jQuery, Drupal, Drupal.debounce);; (function ($, Drupal) { "use strict"; Drupal.behaviors.allowedLanguagesUser = { attach: function (context) { $('#edit-allowed-languages', context) .once('allowedLanguagesUser') .each(function (index, element) { var checkAll = $('#edit-allowed-languages-languages-all', element); var checkboxes = $('input', element).not(checkAll); // When the check all checkbox value changes make sure to // check/un-check all checkboxes. checkAll.on('change', function () { var $element = $(this); checkboxes.prop('checked', $element.is(':checked')); }); // When checkboxes are checked make sure to automatically check the all // checkbox when all checkboxes are checked. checkboxes.on('change', function () { var shouldBeChecked = checkboxes.filter(':checked').length === checkboxes.length; checkAll.prop('checked', shouldBeChecked); }); }); }, }; })(jQuery, Drupal); ; /** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ (function ($, Drupal) { Drupal.behaviors.filterGuidelines = { attach: function attach(context) { function updateFilterGuidelines(event) { var $this = $(event.target); var value = $this.val(); $this.closest('.js-filter-wrapper').find('[data-drupal-format-id]').hide().filter("[data-drupal-format-id=\"".concat(value, "\"]")).show(); } $(context).find('.js-filter-guidelines').once('filter-guidelines').find(':header').hide().closest('.js-filter-wrapper').find('select.js-filter-list').on('change.filterGuidelines', updateFilterGuidelines).trigger('change.filterGuidelines'); } }; })(jQuery, Drupal);; /** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ (function ($, Drupal) { Drupal.behaviors.fileValidateAutoAttach = { attach: function attach(context, settings) { var $context = $(context); var elements; function initFileValidation(selector) { $context.find(selector).once('fileValidate').on('change.fileValidate', { extensions: elements[selector] }, Drupal.file.validateExtension); } if (settings.file && settings.file.elements) { elements = settings.file.elements; Object.keys(elements).forEach(initFileValidation); } }, detach: function detach(context, settings, trigger) { var $context = $(context); var elements; function removeFileValidation(selector) { $context.find(selector).removeOnce('fileValidate').off('change.fileValidate', Drupal.file.validateExtension); } if (trigger === 'unload' && settings.file && settings.file.elements) { elements = settings.file.elements; Object.keys(elements).forEach(removeFileValidation); } } }; Drupal.behaviors.fileAutoUpload = { attach: function attach(context) { $(context).find('input[type="file"]').once('auto-file-upload').on('change.autoFileUpload', Drupal.file.triggerUploadButton); }, detach: function detach(context, settings, trigger) { if (trigger === 'unload') { $(context).find('input[type="file"]').removeOnce('auto-file-upload').off('.autoFileUpload'); } } }; Drupal.behaviors.fileButtons = { attach: function attach(context) { var $context = $(context); $context.find('.js-form-submit').on('mousedown', Drupal.file.disableFields); $context.find('.js-form-managed-file .js-form-submit').on('mousedown', Drupal.file.progressBar); }, detach: function detach(context, settings, trigger) { if (trigger === 'unload') { var $context = $(context); $context.find('.js-form-submit').off('mousedown', Drupal.file.disableFields); $context.find('.js-form-managed-file .js-form-submit').off('mousedown', Drupal.file.progressBar); } } }; Drupal.behaviors.filePreviewLinks = { attach: function attach(context) { $(context).find('div.js-form-managed-file .file a').on('click', Drupal.file.openInNewWindow); }, detach: function detach(context) { $(context).find('div.js-form-managed-file .file a').off('click', Drupal.file.openInNewWindow); } }; Drupal.file = Drupal.file || { validateExtension: function validateExtension(event) { event.preventDefault(); $('.file-upload-js-error').remove(); var extensionPattern = event.data.extensions.replace(/,\s*/g, '|'); if (extensionPattern.length > 1 && this.value.length > 0) { var acceptableMatch = new RegExp("\\.(".concat(extensionPattern, ")$"), 'gi'); if (!acceptableMatch.test(this.value)) { var error = Drupal.t('The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.', { '%filename': this.value.replace('C:\\fakepath\\', ''), '%extensions': extensionPattern.replace(/\|/g, ', ') }); $(this).closest('div.js-form-managed-file').prepend("
".concat(error, "
")); this.value = ''; event.stopImmediatePropagation(); } } }, triggerUploadButton: function triggerUploadButton(event) { $(event.target).closest('.js-form-managed-file').find('.js-form-submit[data-drupal-selector$="upload-button"]').trigger('mousedown'); }, disableFields: function disableFields(event) { var $clickedButton = $(this); $clickedButton.trigger('formUpdated'); var $enabledFields = []; if ($clickedButton.closest('div.js-form-managed-file').length > 0) { $enabledFields = $clickedButton.closest('div.js-form-managed-file').find('input.js-form-file'); } var $fieldsToTemporarilyDisable = $('div.js-form-managed-file input.js-form-file').not($enabledFields).not(':disabled'); $fieldsToTemporarilyDisable.prop('disabled', true); setTimeout(function () { $fieldsToTemporarilyDisable.prop('disabled', false); }, 1000); }, progressBar: function progressBar(event) { var $clickedButton = $(this); var $progressId = $clickedButton.closest('div.js-form-managed-file').find('input.file-progress'); if ($progressId.length) { var originalName = $progressId.attr('name'); $progressId.attr('name', originalName.match(/APC_UPLOAD_PROGRESS|UPLOAD_IDENTIFIER/)[0]); setTimeout(function () { $progressId.attr('name', originalName); }, 1000); } setTimeout(function () { $clickedButton.closest('div.js-form-managed-file').find('div.ajax-progress-bar').slideDown(); }, 500); $clickedButton.trigger('fileUpload'); }, openInNewWindow: function openInNewWindow(event) { event.preventDefault(); $(this).attr('target', '_blank'); window.open(this.href, 'filePreview', 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1,width=500,height=550'); } }; })(jQuery, Drupal);; /*! * jQuery Form Plugin * version: 4.3.0 * Requires jQuery v1.7.2 or later * Project repository: https://github.com/jquery-form/form * Copyright 2017 Kevin Morris * Copyright 2006 M. Alsup * Dual licensed under the LGPL-2.1+ or MIT licenses * https://github.com/jquery-form/form#license * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ !function(r){"function"==typeof define&&define.amd?define(["jquery"],r):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),r(t),t}:r(jQuery)}(function(q){"use strict";var m=/\r?\n/g,S={};S.fileapi=void 0!==q('').get(0).files,S.formdata=void 0!==window.FormData;var _=!!q.fn.prop;function o(e){var t=e.data;e.isDefaultPrevented()||(e.preventDefault(),q(e.target).closest("form").ajaxSubmit(t))}function i(e){var t=e.target,r=q(t);if(!r.is("[type=submit],[type=image]")){var a=r.closest("[type=submit]");if(0===a.length)return;t=a[0]}var n,o=t.form;"image"===(o.clk=t).type&&(void 0!==e.offsetX?(o.clk_x=e.offsetX,o.clk_y=e.offsetY):"function"==typeof q.fn.offset?(n=r.offset(),o.clk_x=e.pageX-n.left,o.clk_y=e.pageY-n.top):(o.clk_x=e.pageX-t.offsetLeft,o.clk_y=e.pageY-t.offsetTop)),setTimeout(function(){o.clk=o.clk_x=o.clk_y=null},100)}function N(){var e;q.fn.ajaxSubmit.debug&&(e="[jquery.form] "+Array.prototype.join.call(arguments,""),window.console&&window.console.log?window.console.log(e):window.opera&&window.opera.postError&&window.opera.postError(e))}q.fn.attr2=function(){if(!_)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},q.fn.ajaxSubmit=function(M,e,t,r){if(!this.length)return N("ajaxSubmit: skipping submit process - no element selected"),this;var O,a,n,o,X=this;"function"==typeof M?M={success:M}:"string"==typeof M||!1===M&&0',s)).css({position:"absolute",top:"-1000px",left:"-1000px"}),m=d[0],p={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(e){var t="timeout"===e?"timeout":"aborted";N("aborting upload... "+t),this.aborted=1;try{m.contentWindow.document.execCommand&&m.contentWindow.document.execCommand("Stop")}catch(e){}d.attr("src",l.iframeSrc),p.error=t,l.error&&l.error.call(l.context,p,t,e),f&&q.event.trigger("ajaxError",[p,l,t]),l.complete&&l.complete.call(l.context,p,t)}},(f=l.global)&&0==q.active++&&q.event.trigger("ajaxStart"),f&&q.event.trigger("ajaxSend",[p,l]),l.beforeSend&&!1===l.beforeSend.call(l.context,p,l))return l.global&&q.active--,g.reject(),g;if(p.aborted)return g.reject(),g;(a=i.clk)&&(n=a.name)&&!a.disabled&&(l.extraData=l.extraData||{},l.extraData[n]=a.value,"image"===a.type&&(l.extraData[n+".x"]=i.clk_x,l.extraData[n+".y"]=i.clk_y));var x=1,y=2;function b(t){var r=null;try{t.contentWindow&&(r=t.contentWindow.document)}catch(e){N("cannot get iframe.contentWindow document: "+e)}if(r)return r;try{r=t.contentDocument?t.contentDocument:t.document}catch(e){N("cannot get iframe.contentDocument: "+e),r=t.document}return r}var c=q("meta[name=csrf-token]").attr("content"),T=q("meta[name=csrf-param]").attr("content");function j(){var e=X.attr2("target"),t=X.attr2("action"),r=X.attr("enctype")||X.attr("encoding")||"multipart/form-data";i.setAttribute("target",o),O&&!/post/i.test(O)||i.setAttribute("method","POST"),t!==l.url&&i.setAttribute("action",l.url),l.skipEncodingOverride||O&&!/post/i.test(O)||X.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),l.timeout&&(v=setTimeout(function(){h=!0,A(x)},l.timeout));var a=[];try{if(l.extraData)for(var n in l.extraData)l.extraData.hasOwnProperty(n)&&(q.isPlainObject(l.extraData[n])&&l.extraData[n].hasOwnProperty("name")&&l.extraData[n].hasOwnProperty("value")?a.push(q('',s).val(l.extraData[n].value).appendTo(i)[0]):a.push(q('',s).val(l.extraData[n]).appendTo(i)[0]));l.iframeTarget||d.appendTo(u),m.attachEvent?m.attachEvent("onload",A):m.addEventListener("load",A,!1),setTimeout(function e(){try{var t=b(m).readyState;N("state = "+t),t&&"uninitialized"===t.toLowerCase()&&setTimeout(e,50)}catch(e){N("Server abort: ",e," (",e.name,")"),A(y),v&&clearTimeout(v),v=void 0}},15);try{i.submit()}catch(e){document.createElement("form").submit.apply(i)}}finally{i.setAttribute("action",t),i.setAttribute("enctype",r),e?i.setAttribute("target",e):X.removeAttr("target"),q(a).remove()}}T&&c&&(l.extraData=l.extraData||{},l.extraData[T]=c),l.forceSync?j():setTimeout(j,10);var w,S,k,D=50;function A(e){if(!p.aborted&&!k){if((S=b(m))||(N("cannot access response document"),e=y),e===x&&p)return p.abort("timeout"),void g.reject(p,"timeout");if(e===y&&p)return p.abort("server abort"),void g.reject(p,"error","server abort");if(S&&S.location.href!==l.iframeSrc||h){m.detachEvent?m.detachEvent("onload",A):m.removeEventListener("load",A,!1);var t,r="success";try{if(h)throw"timeout";var a="xml"===l.dataType||S.XMLDocument||q.isXMLDoc(S);if(N("isXml="+a),!a&&window.opera&&(null===S.body||!S.body.innerHTML)&&--D)return N("requeing onLoad callback, DOM not available"),void setTimeout(A,250);var n=S.body?S.body:S.documentElement;p.responseText=n?n.innerHTML:null,p.responseXML=S.XMLDocument?S.XMLDocument:S,a&&(l.dataType="xml"),p.getResponseHeader=function(e){return{"content-type":l.dataType}[e.toLowerCase()]},n&&(p.status=Number(n.getAttribute("status"))||p.status,p.statusText=n.getAttribute("statusText")||p.statusText);var o,i,s,u=(l.dataType||"").toLowerCase(),c=/(json|script|text)/.test(u);c||l.textarea?(o=S.getElementsByTagName("textarea")[0])?(p.responseText=o.value,p.status=Number(o.getAttribute("status"))||p.status,p.statusText=o.getAttribute("statusText")||p.statusText):c&&(i=S.getElementsByTagName("pre")[0],s=S.getElementsByTagName("body")[0],i?p.responseText=i.textContent?i.textContent:i.innerText:s&&(p.responseText=s.textContent?s.textContent:s.innerText)):"xml"===u&&!p.responseXML&&p.responseText&&(p.responseXML=F(p.responseText));try{w=E(p,u,l)}catch(e){r="parsererror",p.error=t=e||r}}catch(e){N("error caught: ",e),r="error",p.error=t=e||r}p.aborted&&(N("upload aborted"),r=null),p.status&&(r=200<=p.status&&p.status<300||304===p.status?"success":"error"),"success"===r?(l.success&&l.success.call(l.context,w,"success",p),g.resolve(p.responseText,"success",p),f&&q.event.trigger("ajaxSuccess",[p,l])):r&&(void 0===t&&(t=p.statusText),l.error&&l.error.call(l.context,p,r,t),g.reject(p,"error",t),f&&q.event.trigger("ajaxError",[p,l,t])),f&&q.event.trigger("ajaxComplete",[p,l]),f&&!--q.active&&q.event.trigger("ajaxStop"),l.complete&&l.complete.call(l.context,p,r),k=!0,l.timeout&&clearTimeout(v),setTimeout(function(){l.iframeTarget?d.attr("src",l.iframeSrc):d.remove(),p.responseXML=null},100)}}}var F=q.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},L=q.parseJSON||function(e){return window.eval("("+e+")")},E=function(e,t,r){var a=e.getResponseHeader("content-type")||"",n=("xml"===t||!t)&&0<=a.indexOf("xml"),o=n?e.responseXML:e.responseText;return n&&"parsererror"===o.documentElement.nodeName&&q.error&&q.error("parsererror"),r&&r.dataFilter&&(o=r.dataFilter(o,t)),"string"==typeof o&&(("json"===t||!t)&&0<=a.indexOf("json")?o=L(o):("script"===t||!t)&&0<=a.indexOf("javascript")&&q.globalEval(o)),o};return g}},q.fn.ajaxForm=function(e,t,r,a){if(("string"==typeof e||!1===e&&0") + '
 
' + '
' + '
' + '
 
' + ''; }; Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) { this.id = id; this.method = method || 'GET'; this.updateCallback = updateCallback; this.errorCallback = errorCallback; this.element = $(Drupal.theme('progressBar', id)); }; $.extend(Drupal.ProgressBar.prototype, { setProgress: function setProgress(percentage, message, label) { if (percentage >= 0 && percentage <= 100) { $(this.element).find('div.progress__bar').css('width', "".concat(percentage, "%")); $(this.element).find('div.progress__percentage').html("".concat(percentage, "%")); } $('div.progress__description', this.element).html(message); $('div.progress__label', this.element).html(label); if (this.updateCallback) { this.updateCallback(percentage, message, this); } }, startMonitoring: function startMonitoring(uri, delay) { this.delay = delay; this.uri = uri; this.sendPing(); }, stopMonitoring: function stopMonitoring() { clearTimeout(this.timer); this.uri = null; }, sendPing: function sendPing() { if (this.timer) { clearTimeout(this.timer); } if (this.uri) { var pb = this; var uri = this.uri; if (uri.indexOf('?') === -1) { uri += '?'; } else { uri += '&'; } uri += '_format=json'; $.ajax({ type: this.method, url: uri, data: '', dataType: 'json', success: function success(progress) { if (progress.status === 0) { pb.displayError(progress.data); return; } pb.setProgress(progress.percentage, progress.message, progress.label); pb.timer = setTimeout(function () { pb.sendPing(); }, pb.delay); }, error: function error(xmlhttp) { var e = new Drupal.AjaxError(xmlhttp, pb.uri); pb.displayError("
".concat(e.message, "
")); } }); } }, displayError: function displayError(string) { var error = $('
').html(string); $(this.element).before(error).hide(); if (this.errorCallback) { this.errorCallback(this); } } }); })(jQuery, Drupal);; /** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ (function (Drupal) { Drupal.behaviors.responsiveImageAJAX = { attach: function attach() { if (window.picturefill) { window.picturefill(); } } }; })(Drupal);; /** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } (function ($, window, Drupal, drupalSettings, _ref) { var isFocusable = _ref.isFocusable, tabbable = _ref.tabbable; Drupal.behaviors.AJAX = { attach: function attach(context, settings) { function loadAjaxBehavior(base) { var elementSettings = settings.ajax[base]; if (typeof elementSettings.selector === 'undefined') { elementSettings.selector = "#".concat(base); } $(elementSettings.selector).once('drupal-ajax').each(function () { elementSettings.element = this; elementSettings.base = base; Drupal.ajax(elementSettings); }); } Object.keys(settings.ajax || {}).forEach(function (base) { return loadAjaxBehavior(base); }); Drupal.ajax.bindAjaxLinks(document.body); $('.use-ajax-submit').once('ajax').each(function () { var elementSettings = {}; elementSettings.url = $(this.form).attr('action'); elementSettings.setClick = true; elementSettings.event = 'click'; elementSettings.progress = { type: 'throbber' }; elementSettings.base = $(this).attr('id'); elementSettings.element = this; Drupal.ajax(elementSettings); }); }, detach: function detach(context, settings, trigger) { if (trigger === 'unload') { Drupal.ajax.expired().forEach(function (instance) { Drupal.ajax.instances[instance.instanceIndex] = null; }); } } }; Drupal.AjaxError = function (xmlhttp, uri, customMessage) { var statusCode; var statusText; var responseText; if (xmlhttp.status) { statusCode = "\n".concat(Drupal.t('An AJAX HTTP error occurred.'), "\n").concat(Drupal.t('HTTP Result Code: !status', { '!status': xmlhttp.status })); } else { statusCode = "\n".concat(Drupal.t('An AJAX HTTP request terminated abnormally.')); } statusCode += "\n".concat(Drupal.t('Debugging information follows.')); var pathText = "\n".concat(Drupal.t('Path: !uri', { '!uri': uri })); statusText = ''; try { statusText = "\n".concat(Drupal.t('StatusText: !statusText', { '!statusText': $.trim(xmlhttp.statusText) })); } catch (e) {} responseText = ''; try { responseText = "\n".concat(Drupal.t('ResponseText: !responseText', { '!responseText': $.trim(xmlhttp.responseText) })); } catch (e) {} responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, ''); responseText = responseText.replace(/[\n]+\s+/g, '\n'); var readyStateText = xmlhttp.status === 0 ? "\n".concat(Drupal.t('ReadyState: !readyState', { '!readyState': xmlhttp.readyState })) : ''; customMessage = customMessage ? "\n".concat(Drupal.t('CustomMessage: !customMessage', { '!customMessage': customMessage })) : ''; this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText; this.name = 'AjaxError'; }; Drupal.AjaxError.prototype = new Error(); Drupal.AjaxError.prototype.constructor = Drupal.AjaxError; Drupal.ajax = function (settings) { if (arguments.length !== 1) { throw new Error('Drupal.ajax() function must be called with one configuration object only'); } var base = settings.base || false; var element = settings.element || false; delete settings.base; delete settings.element; if (!settings.progress && !element) { settings.progress = false; } var ajax = new Drupal.Ajax(base, element, settings); ajax.instanceIndex = Drupal.ajax.instances.length; Drupal.ajax.instances.push(ajax); return ajax; }; Drupal.ajax.instances = []; Drupal.ajax.expired = function () { return Drupal.ajax.instances.filter(function (instance) { return instance && instance.element !== false && !document.body.contains(instance.element); }); }; Drupal.ajax.bindAjaxLinks = function (element) { $(element).find('.use-ajax').once('ajax').each(function (i, ajaxLink) { var $linkElement = $(ajaxLink); var elementSettings = { progress: { type: 'throbber' }, dialogType: $linkElement.data('dialog-type'), dialog: $linkElement.data('dialog-options'), dialogRenderer: $linkElement.data('dialog-renderer'), base: $linkElement.attr('id'), element: ajaxLink }; var href = $linkElement.attr('href'); if (href) { elementSettings.url = href; elementSettings.event = 'click'; } Drupal.ajax(elementSettings); }); }; Drupal.Ajax = function (base, element, elementSettings) { var defaults = { event: element ? 'mousedown' : null, keypress: true, selector: base ? "#".concat(base) : null, effect: 'none', speed: 'none', method: 'replaceWith', progress: { type: 'throbber', message: Drupal.t('Please wait...') }, submit: { js: true } }; $.extend(this, defaults, elementSettings); this.commands = new Drupal.AjaxCommands(); this.instanceIndex = false; if (this.wrapper) { this.wrapper = "#".concat(this.wrapper); } this.element = element; this.element_settings = elementSettings; this.elementSettings = elementSettings; if (this.element && this.element.form) { this.$form = $(this.element.form); } if (!this.url) { var $element = $(this.element); if ($element.is('a')) { this.url = $element.attr('href'); } else if (this.element && element.form) { this.url = this.$form.attr('action'); } } var originalUrl = this.url; this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1'); if (drupalSettings.ajaxTrustedUrl[originalUrl]) { drupalSettings.ajaxTrustedUrl[this.url] = true; } var ajax = this; ajax.options = { url: ajax.url, data: ajax.submit, beforeSerialize: function beforeSerialize(elementSettings, options) { return ajax.beforeSerialize(elementSettings, options); }, beforeSubmit: function beforeSubmit(formValues, elementSettings, options) { ajax.ajaxing = true; return ajax.beforeSubmit(formValues, elementSettings, options); }, beforeSend: function beforeSend(xmlhttprequest, options) { ajax.ajaxing = true; return ajax.beforeSend(xmlhttprequest, options); }, success: function success(response, status, xmlhttprequest) { if (typeof response === 'string') { response = $.parseJSON(response); } if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) { if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') { var customMessage = Drupal.t('The response failed verification so will not be processed.'); return ajax.error(xmlhttprequest, ajax.url, customMessage); } } return ajax.success(response, status); }, complete: function complete(xmlhttprequest, status) { ajax.ajaxing = false; if (status === 'error' || status === 'parsererror') { return ajax.error(xmlhttprequest, ajax.url); } }, dataType: 'json', jsonp: false, type: 'POST' }; if (elementSettings.dialog) { ajax.options.data.dialogOptions = elementSettings.dialog; } if (ajax.options.url.indexOf('?') === -1) { ajax.options.url += '?'; } else { ajax.options.url += '&'; } var wrapper = "drupal_".concat(elementSettings.dialogType || 'ajax'); if (elementSettings.dialogRenderer) { wrapper += ".".concat(elementSettings.dialogRenderer); } ajax.options.url += "".concat(Drupal.ajax.WRAPPER_FORMAT, "=").concat(wrapper); $(ajax.element).on(elementSettings.event, function (event) { if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) { throw new Error(Drupal.t('The callback URL is not local and not trusted: !url', { '!url': ajax.url })); } return ajax.eventResponse(this, event); }); if (elementSettings.keypress) { $(ajax.element).on('keypress', function (event) { return ajax.keypressResponse(this, event); }); } if (elementSettings.prevent) { $(ajax.element).on(elementSettings.prevent, false); } }; Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format'; Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax'; Drupal.Ajax.prototype.execute = function () { if (this.ajaxing) { return; } try { this.beforeSerialize(this.element, this.options); return $.ajax(this.options); } catch (e) { this.ajaxing = false; window.alert("An error occurred while attempting to process ".concat(this.options.url, ": ").concat(e.message)); return $.Deferred().reject(); } }; Drupal.Ajax.prototype.keypressResponse = function (element, event) { var ajax = this; if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') { event.preventDefault(); event.stopPropagation(); $(element).trigger(ajax.elementSettings.event); } }; Drupal.Ajax.prototype.eventResponse = function (element, event) { event.preventDefault(); event.stopPropagation(); var ajax = this; if (ajax.ajaxing) { return; } try { if (ajax.$form) { if (ajax.setClick) { element.form.clk = element; } ajax.$form.ajaxSubmit(ajax.options); } else { ajax.beforeSerialize(ajax.element, ajax.options); $.ajax(ajax.options); } } catch (e) { ajax.ajaxing = false; window.alert("An error occurred while attempting to process ".concat(ajax.options.url, ": ").concat(e.message)); } }; Drupal.Ajax.prototype.beforeSerialize = function (element, options) { if (this.$form && document.body.contains(this.$form.get(0))) { var settings = this.settings || drupalSettings; Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize'); } options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1; var pageState = drupalSettings.ajaxPageState; options.data['ajax_page_state[theme]'] = pageState.theme; options.data['ajax_page_state[theme_token]'] = pageState.theme_token; options.data['ajax_page_state[libraries]'] = pageState.libraries; }; Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {}; Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) { if (this.$form) { options.extraData = options.extraData || {}; options.extraData.ajax_iframe_upload = '1'; var v = $.fieldValue(this.element); if (v !== null) { options.extraData[this.element.name] = v; } } $(this.element).prop('disabled', true); if (!this.progress || !this.progress.type) { return; } var progressIndicatorMethod = "setProgressIndicator".concat(this.progress.type.slice(0, 1).toUpperCase()).concat(this.progress.type.slice(1).toLowerCase()); if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') { this[progressIndicatorMethod].call(this); } }; Drupal.theme.ajaxProgressThrobber = function (message) { var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : ''; var throbber = '
 
'; return "
".concat(throbber).concat(messageMarkup, "
"); }; Drupal.theme.ajaxProgressIndicatorFullscreen = function () { return '
 
'; }; Drupal.theme.ajaxProgressMessage = function (message) { return "
".concat(message, "
"); }; Drupal.theme.ajaxProgressBar = function ($element) { return $('
').append($element); }; Drupal.Ajax.prototype.setProgressIndicatorBar = function () { var progressBar = new Drupal.ProgressBar("ajax-progress-".concat(this.element.id), $.noop, this.progress.method, $.noop); if (this.progress.message) { progressBar.setProgress(-1, this.progress.message); } if (this.progress.url) { progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500); } this.progress.element = $(Drupal.theme('ajaxProgressBar', progressBar.element)); this.progress.object = progressBar; $(this.element).after(this.progress.element); }; Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () { this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message)); $(this.element).after(this.progress.element); }; Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () { this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen')); $('body').append(this.progress.element); }; Drupal.Ajax.prototype.success = function (response, status) { var _this = this; if (this.progress.element) { $(this.progress.element).remove(); } if (this.progress.object) { this.progress.object.stopMonitoring(); } $(this.element).prop('disabled', false); var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray(); var focusChanged = false; Object.keys(response || {}).forEach(function (i) { if (response[i].command && _this.commands[response[i].command]) { _this.commands[response[i].command](_this, response[i], status); if (response[i].command === 'invoke' && response[i].method === 'focus' || response[i].command === 'focusFirst') { focusChanged = true; } } }); if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) { var target = false; for (var n = elementParents.length - 1; !target && n >= 0; n--) { target = document.querySelector("[data-drupal-selector=\"".concat(elementParents[n].getAttribute('data-drupal-selector'), "\"]")); } if (target) { $(target).trigger('focus'); } } if (this.$form && document.body.contains(this.$form.get(0))) { var settings = this.settings || drupalSettings; Drupal.attachBehaviors(this.$form.get(0), settings); } this.settings = null; }; Drupal.Ajax.prototype.getEffect = function (response) { var type = response.effect || this.effect; var speed = response.speed || this.speed; var effect = {}; if (type === 'none') { effect.showEffect = 'show'; effect.hideEffect = 'hide'; effect.showSpeed = ''; } else if (type === 'fade') { effect.showEffect = 'fadeIn'; effect.hideEffect = 'fadeOut'; effect.showSpeed = speed; } else { effect.showEffect = "".concat(type, "Toggle"); effect.hideEffect = "".concat(type, "Toggle"); effect.showSpeed = speed; } return effect; }; Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) { if (this.progress.element) { $(this.progress.element).remove(); } if (this.progress.object) { this.progress.object.stopMonitoring(); } $(this.wrapper).show(); $(this.element).prop('disabled', false); if (this.$form && document.body.contains(this.$form.get(0))) { var settings = this.settings || drupalSettings; Drupal.attachBehaviors(this.$form.get(0), settings); } throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage); }; Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) { return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) { return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent)); }).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent; }; Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) { return $('
').append($elements); }; Drupal.AjaxCommands = function () {}; Drupal.AjaxCommands.prototype = { insert: function insert(ajax, response) { var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper); var method = response.method || ajax.method; var effect = ajax.getEffect(response); var settings = response.settings || ajax.settings || drupalSettings; var $newContent = $($.parseHTML(response.data, document, true)); $newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response); switch (method) { case 'html': case 'replaceWith': case 'replaceAll': case 'empty': case 'remove': Drupal.detachBehaviors($wrapper.get(0), settings); break; default: break; } $wrapper[method]($newContent); if (effect.showEffect !== 'show') { $newContent.hide(); } var $ajaxNewContent = $newContent.find('.ajax-new-content'); if ($ajaxNewContent.length) { $ajaxNewContent.hide(); $newContent.show(); $ajaxNewContent[effect.showEffect](effect.showSpeed); } else if (effect.showEffect !== 'show') { $newContent[effect.showEffect](effect.showSpeed); } if ($newContent.parents('html').length) { $newContent.each(function (index, element) { if (element.nodeType === Node.ELEMENT_NODE) { Drupal.attachBehaviors(element, settings); } }); } }, remove: function remove(ajax, response, status) { var settings = response.settings || ajax.settings || drupalSettings; $(response.selector).each(function () { Drupal.detachBehaviors(this, settings); }).remove(); }, changed: function changed(ajax, response, status) { var $element = $(response.selector); if (!$element.hasClass('ajax-changed')) { $element.addClass('ajax-changed'); if (response.asterisk) { $element.find(response.asterisk).append(" * ")); } } }, alert: function alert(ajax, response, status) { window.alert(response.text); }, announce: function announce(ajax, response) { if (response.priority) { Drupal.announce(response.text, response.priority); } else { Drupal.announce(response.text); } }, redirect: function redirect(ajax, response, status) { window.location = response.url; }, css: function css(ajax, response, status) { $(response.selector).css(response.argument); }, settings: function settings(ajax, response, status) { var ajaxSettings = drupalSettings.ajax; if (ajaxSettings) { Drupal.ajax.expired().forEach(function (instance) { if (instance.selector) { var selector = instance.selector.replace('#', ''); if (selector in ajaxSettings) { delete ajaxSettings[selector]; } } }); } if (response.merge) { $.extend(true, drupalSettings, response.settings); } else { ajax.settings = response.settings; } }, data: function data(ajax, response, status) { $(response.selector).data(response.name, response.value); }, focusFirst: function focusFirst(ajax, response, status) { var focusChanged = false; var container = document.querySelector(response.selector); if (container) { var tabbableElements = tabbable(container); if (tabbableElements.length) { tabbableElements[0].focus(); focusChanged = true; } else if (isFocusable(container)) { container.focus(); focusChanged = true; } } if (ajax.hasOwnProperty('element') && !focusChanged) { ajax.element.focus(); } }, invoke: function invoke(ajax, response, status) { var $element = $(response.selector); $element[response.method].apply($element, _toConsumableArray(response.args)); }, restripe: function restripe(ajax, response, status) { $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even'); }, update_build_id: function update_build_id(ajax, response, status) { $("input[name=\"form_build_id\"][value=\"".concat(response.old, "\"]")).val(response.new); }, add_css: function add_css(ajax, response, status) { $('head').prepend(response.data); }, message: function message(ajax, response) { var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector)); if (response.clearPrevious) { messages.clear(); } messages.add(response.message, response.messageOptions); } }; })(jQuery, window, Drupal, drupalSettings, window.tabbable);; /** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ (function ($, Drupal) { Drupal.user = { password: { css: { passwordParent: 'password-parent', passwordsMatch: 'ok', passwordsNotMatch: 'error', passwordWeak: 'is-weak', passwordFair: 'is-fair', passwordGood: 'is-good', passwordStrong: 'is-strong', widgetInitial: '', passwordEmpty: '', passwordFilled: '', confirmEmpty: '', confirmFilled: '' } } }; Drupal.behaviors.password = { attach: function attach(context, settings) { var cssClasses = Drupal.user.password.css; $(context).find('input.js-password-field').once('password').each(function (index, value) { var $mainInput = $(value); var $mainInputParent = $mainInput.parent().addClass(cssClasses.passwordParent); var $passwordWidget = $mainInput.closest('.js-form-type-password-confirm'); var $confirmInput = $passwordWidget.find('input.js-password-confirm'); var $passwordConfirmMessage = $(Drupal.theme('passwordConfirmMessage', settings.password)); var $passwordMatchStatus = $passwordConfirmMessage.find('[data-drupal-selector="password-match-status-text"]').first(); if ($passwordMatchStatus.length === 0) { $passwordMatchStatus = $passwordConfirmMessage.find('span').first(); Drupal.deprecationError({ message: 'Returning without data-drupal-selector="password-match-status-text" attribute is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3152101' }); } var $confirmInputParent = $confirmInput.parent().addClass('confirm-parent').append($passwordConfirmMessage); var passwordStrengthBarClassesToRemove = [cssClasses.passwordWeak || '', cssClasses.passwordFair || '', cssClasses.passwordGood || '', cssClasses.passwordStrong || ''].join(' ').trim(); var confirmTextWrapperClassesToRemove = [cssClasses.passwordsMatch || '', cssClasses.passwordsNotMatch || ''].join(' ').trim(); var widgetClassesToRemove = [cssClasses.widgetInitial || '', cssClasses.passwordEmpty || '', cssClasses.passwordFilled || '', cssClasses.confirmEmpty || '', cssClasses.confirmFilled || ''].join(' ').trim(); var password = {}; if (settings.password.showStrengthIndicator) { var $passwordStrength = $(Drupal.theme('passwordStrength', settings.password)); password.$strengthBar = $passwordStrength.find('[data-drupal-selector="password-strength-indicator"]').first(); if (password.$strengthBar.length === 0) { password.$strengthBar = $passwordStrength.find('.js-password-strength__indicator').first(); Drupal.deprecationError({ message: 'The js-password-strength__indicator class is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Replace js-password-strength__indicator with a data-drupal-selector="password-strength-indicator" attribute. See https://www.drupal.org/node/3152101' }); } password.$strengthTextWrapper = $passwordStrength.find('[data-drupal-selector="password-strength-text"]').first(); if (password.$strengthTextWrapper.length === 0) { password.$strengthTextWrapper = $passwordStrength.find('.js-password-strength__text').first(); Drupal.deprecationError({ message: 'The js-password-strength__text class is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. Replace js-password-strength__text with a data-drupal-selector="password-strength-text" attribute. See https://www.drupal.org/node/3152101' }); } password.$suggestions = $(Drupal.theme('passwordSuggestions', settings.password, [])); password.$suggestions.hide(); $mainInputParent.append($passwordStrength); $confirmInputParent.after(password.$suggestions); } var addWidgetClasses = function addWidgetClasses() { $passwordWidget.addClass($mainInput.val() ? cssClasses.passwordFilled : cssClasses.passwordEmpty).addClass($confirmInput.val() ? cssClasses.confirmFilled : cssClasses.confirmEmpty); }; var passwordCheckMatch = function passwordCheckMatch(confirmInputVal) { var passwordsAreMatching = $mainInput.val() === confirmInputVal; var confirmClass = passwordsAreMatching ? cssClasses.passwordsMatch : cssClasses.passwordsNotMatch; var confirmMessage = passwordsAreMatching ? settings.password.confirmSuccess : settings.password.confirmFailure; if (!$passwordMatchStatus.hasClass(confirmClass) || !$passwordMatchStatus.html() === confirmMessage) { if (confirmTextWrapperClassesToRemove) { $passwordMatchStatus.removeClass(confirmTextWrapperClassesToRemove); } $passwordMatchStatus.html(confirmMessage).addClass(confirmClass); } }; var passwordCheck = function passwordCheck() { if (settings.password.showStrengthIndicator) { var result = Drupal.evaluatePasswordStrength($mainInput.val(), settings.password); var $currentPasswordSuggestions = $(Drupal.theme('passwordSuggestions', settings.password, result.messageTips)); if (password.$suggestions.html() !== $currentPasswordSuggestions.html()) { password.$suggestions.replaceWith($currentPasswordSuggestions); password.$suggestions = $currentPasswordSuggestions.toggle(result.strength !== 100); } if (passwordStrengthBarClassesToRemove) { password.$strengthBar.removeClass(passwordStrengthBarClassesToRemove); } password.$strengthBar.css('width', "".concat(result.strength, "%")).addClass(result.indicatorClass); password.$strengthTextWrapper.html(result.indicatorText); } if ($confirmInput.val()) { passwordCheckMatch($confirmInput.val()); $passwordConfirmMessage.css({ visibility: 'visible' }); } else { $passwordConfirmMessage.css({ visibility: 'hidden' }); } if (widgetClassesToRemove) { $passwordWidget.removeClass(widgetClassesToRemove); addWidgetClasses(); } }; if (widgetClassesToRemove) { addWidgetClasses(); } $mainInput.on('input', passwordCheck); $confirmInput.on('input', passwordCheck); }); } }; Drupal.evaluatePasswordStrength = function (password, passwordSettings) { password = password.trim(); var indicatorText; var indicatorClass; var weaknesses = 0; var strength = 100; var msg = []; var hasLowercase = /[a-z]/.test(password); var hasUppercase = /[A-Z]/.test(password); var hasNumbers = /[0-9]/.test(password); var hasPunctuation = /[^a-zA-Z0-9]/.test(password); var $usernameBox = $('input.username'); var username = $usernameBox.length > 0 ? $usernameBox.val() : passwordSettings.username; if (password.length < 12) { msg.push(passwordSettings.tooShort); strength -= (12 - password.length) * 5 + 30; } if (!hasLowercase) { msg.push(passwordSettings.addLowerCase); weaknesses += 1; } if (!hasUppercase) { msg.push(passwordSettings.addUpperCase); weaknesses += 1; } if (!hasNumbers) { msg.push(passwordSettings.addNumbers); weaknesses += 1; } if (!hasPunctuation) { msg.push(passwordSettings.addPunctuation); weaknesses += 1; } switch (weaknesses) { case 1: strength -= 12.5; break; case 2: strength -= 25; break; case 3: strength -= 40; break; case 4: strength -= 40; break; } if (password !== '' && password.toLowerCase() === username.toLowerCase()) { msg.push(passwordSettings.sameAsUsername); strength = 5; } var cssClasses = Drupal.user.password.css; if (strength < 60) { indicatorText = passwordSettings.weak; indicatorClass = cssClasses.passwordWeak; } else if (strength < 70) { indicatorText = passwordSettings.fair; indicatorClass = cssClasses.passwordFair; } else if (strength < 80) { indicatorText = passwordSettings.good; indicatorClass = cssClasses.passwordGood; } else if (strength <= 100) { indicatorText = passwordSettings.strong; indicatorClass = cssClasses.passwordStrong; } var messageTips = msg; msg = "".concat(passwordSettings.hasWeaknesses, "
  • ").concat(msg.join('
  • '), "
"); return Drupal.deprecatedProperty({ target: { strength: strength, message: msg, indicatorText: indicatorText, indicatorClass: indicatorClass, messageTips: messageTips }, deprecatedProperty: 'message', message: 'The message property is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. The markup should be constructed using messageTips property and Drupal.theme.passwordSuggestions. See https://www.drupal.org/node/3130352' }); }; })(jQuery, Drupal);; /** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ (function (Drupal) { Drupal.theme.passwordConfirmMessage = function (_ref) { var confirmTitle = _ref.confirmTitle; var confirmTextWrapper = ''; return "
".concat(confirmTitle, " ").concat(confirmTextWrapper, "
"); }; Drupal.theme.passwordStrength = function (_ref2) { var strengthTitle = _ref2.strengthTitle; var strengthIndicator = '
'; var strengthText = ''; return "\n
\n
".concat(strengthIndicator, "
\n
").concat(strengthTitle, " ").concat(strengthText, "
\n
\n "); }; Drupal.theme.passwordSuggestions = function (_ref3, tips) { var hasWeaknesses = _ref3.hasWeaknesses; return "
".concat(tips.length ? "".concat(hasWeaknesses, "
  • ").concat(tips.join('
  • '), "
") : '', "
"); }; })(Drupal);; (function($){ function addListener(element, event, fn) { // Use addEventListener if available if (element.addEventListener) { element.addEventListener(event, fn, false); // Otherwise use attachEvent, set this and event } else if (element.attachEvent) { element.attachEvent('on' + event, (function (el) { return function() { fn.call(el, window.event); }; }(element))); // Break closure and primary circular reference to element element = null; } } addListener(window,'load', function () { $(function() { var cs = {}; cs.revealModal = function(el){ // window.location.pathname = '/about/locations'; // cs._html.fadeTo(100, 1).css('display', 'table'); cs._html.addClass('show-country-select'); }; cs.closeModal = function (el) { // cs._html.fadeTo(100, 0).hide(); cs._html.removeClass('show-country-select'); }; cs.regionClick = function (el) { cs.revealRegion($(el.currentTarget).data('region')); cs._html.find('.region[data-region]').attr('style', ''); $(el.currentTarget).css({'background': '#e6e7e9'}); }; cs.revealRegion = function (region) { // var region; if ((region = this._html.find('.country-list[data-region="'+ region +'"]')).length > 0){ cs.hideRegion(); region.fadeTo(100, 1).css('position', 'static'); } }; cs.hideRegion = function () { if (this._html.find('.country-list[data-region]').length > 0){ this._html.find('.country-list[data-region]').each(function(i,el){ $(el).fadeTo(100,0).attr('style', ''); }); } }; cs.locationClick = function(el){ cs.setCookie('locale_code',$(el.currentTarget).data('locale'),365); }; cs.setCookie = function (cname, cvalue, exdays) { var d = new Date(); d.setTime(d.getTime() + (exdays*24*60*60*1000)); var expires = "expires="+ d.toUTCString(); document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; }; if ((cs._html = $('#country-select-wrapper')).length > 0){ cs._html.find('.region').click(cs.regionClick).mouseenter(cs.regionClick); cs._html.find('.location').click(cs.locationClick); $('.region[data-region="' + $('.location.active').closest('[data-region]').data('region') + '"]').first().css({'background': '#e6e7e9'}); if(document.cookie.indexOf('locale_code=') < 0){ cs.setCookie('locale_code','en',30); } if ((cs.flag = $('#flag-header-nav, #flag-mobile-header-nav')).length > 0){ cs.flag.click(cs.revealModal); } if ((cs.close = $('#country-select-close')).length > 0){ cs.close.click(cs.closeModal); } } var locale = window.location.pathname.split('/')[1]; cs.setCookie('locale_code', locale, 30); }); }); // main js container })(jQuery); ;